<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>美策平台</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../datepicker/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="../css/app.css">
    <link rel="stylesheet" type="text/css" href="../css/orderGrad.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="/pc/js/all.js"></script>
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <script type="text/javascript" src="../js/getPageId.js"></script>
</head>
<body>
    <div class="shippingOrderEvaluate orderProductionDocumentary">
        <div class="orderParamTitle">
            订单评价
            <img src="../images/return.png" class="orderRtns" onclick="window.location.href = '../order.html'">
        </div>
        <div style="height:1.066667rem"></div>
        <div class="content">
            <div class="orderCotent">
                <p>订单详情</p>
                <ul>
                    <li>
                        <div>中单企业</div>
                        <div></div>
                    </li>
                    <li>
                        <div>企业地址</div>
                        <div></div>
                    </li>
                    <li>
                        <div>负责人</div>
                        <div></div>
                    </li>
                    <li>
                        <div>联系方式</div>
                        <div></div>
                    </li>
                    <li>
                        <div>订单数量</div>
                        <div></div>
                    </li>
                    <li>
                        <div>订单金额</div>
                        <div></div>
                    </li>
                    <li>
                        <div>订单总价</div>
                        <div></div>
                    </li>
                    <li>
                        <div>厂家备注</div>
                        <div></div>
                    </li>
                    <li>
                        <div>下单时间</div>
                        <div></div>
                    </li>
                    <li>
                        <div>快递运单</div>
                        <div></div>
                    </li>
                    <li>
                        <div>快递类型</div>
                        <div></div>
                    </li>
                    <li>
                        <div>生产进度</div>
                        <div></div>
                    </li>
                    <li class="custom">
                        <div>自定义属性</div>
                        <div>自定义内容</div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="content5">
            <div><p>公司对订单评价<span class="comComment" onclick="window.location.href='shippingNewEvaluation.html?id='+pageId">去评价</span></p></div>
            <textarea class="comContent" placeholder="请输入您遇到的问题（10-200字）" readonly></textarea>
        </div>
        <div class="content5">
            <div><p>工厂对订单评价<span class="facComment" onclick="window.location.href='shippingNewEvaluation.html?id='+pageId">去评价</span></p></div>
            <textarea class="facContent" placeholder="请输入您遇到的问题（10-200字）" readonly></textarea>
        </div>
        <div class="bottom">
            <p>评价将计入信用体系</p>
        </div>
    </div>

    <script type="text/javascript" src="../js/app.js"></script>
    <script type="text/javascript" src="../js/orderPageChange.js"></script>
    <script type="text/javascript" src="../js/order.js"></script>
    <script type="text/javascript" src="../js/alertMsg.js"></script>
<script>
    $(function() {
        var id = localStorage.getItem('orderShowId');
        var userInfo = JSON.parse(localStorage.getItem('userInfo'));
        var app_access = userInfo.app_access;
        var token = userInfo.token;
        var orderShow = {
            getOrderId: function() {
                var data = {
                    id: pageId,
                    app_access: app_access,
                    token: token
                }
                $.ajax({
                    url: '/api/order/my/detail',
                    data: data,
                    type: 'get',
                    dataType: 'json',
                    success: function(res) {
                        if (res.code != 200) {
                            alertMsg(res.msg)
                        } else {
                            var shippingOrderEvaluateHtml = '<li>'+
                                                                '<div>中单企业</div>'+
                                                                '<div>'+res.data.com_name+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>企业地址</div>'+
                                                                '<div>'+res.data.com_address+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>负责人</div>'+
                                                                '<div>'+res.data.legal_name+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>联系方式</div>'+
                                                                '<div>'+res.data.legal_mobile+'</div>'+
                                                            '</li>'
                                                            '<li>'
                                                                '<div>订单数量</div>'+
                                                                '<div>'+res.data.num+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>订单金额</div>'+
                                                                '<div>'+res.data.money+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>订单总价</div>'+
                                                                '<div>'+res.data.all_money+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>厂家备注</div>'+
                                                                '<div>'+res.data.note+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>下单时间</div>'+
                                                                '<div>'+res.data.created_at+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>快递运单</div>'+
                                                                '<div>'+res.data.kd_code+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>快递类型</div>'+
                                                                '<div>'+res.data.kd_name+'</div>'+
                                                            '</li>'+
                                                            '<li>'+
                                                                '<div>生产进度</div>'+
                                                                '<div>'+res.data.status+'</div>'+
                                                            '</li>'+
                                                            '<li class="custom">'+
                                                                '<div>自定义属性</div>'+
                                                                '<div>自定义内容</div>'+
                                                            '</li>'
                            $('.orderCotent ul').html(shippingOrderEvaluateHtml)
                            $('.comContent').html(res.data.orderComComment)
                            $('.facContent').html(res.data.orderFacComment)

                            if(res.data.orderComComment){
                                $('.comComment').hide();
                            }
                            if(res.data.orderFacComment){
                                $('.facComment').hide();
                            }
                            if(res.data.uid == res.data.fid){
                                $('.comComment').hide();
                            }
                            if(res.data.uid == res.data.cid){
                                $('.facComment').hide();
                            }
                        }
                    },
                    err: function(err) {
                        alertMsg(err)
                    }
                })
            }
        }
       
        orderShow.getOrderId()
    })
</script>
</body>
</html>